ENTRANCE_SHARP
Overview
Calculate the loss coefficient (K) for a sharp entrance to a pipe flush with a reservoir wall.
Excel Usage
=ENTRANCE_SHARP(ent_sharp_method)
ent_sharp_method(str, optional, default: “Rennels”): Calculation method - Rennels, Swamee, Blevins, Idelchik, Crane, or Miller
Returns (float): Loss coefficient K for the sharp entrance [-]
Examples
Example 1: Default Rennels method
Inputs:
| ent_sharp_method |
|---|
| Rennels |
Excel formula:
=ENTRANCE_SHARP("Rennels")
Expected output:
| Result |
|---|
| 0.57 |
Example 2: Swamee method returns 0.5
Inputs:
| ent_sharp_method |
|---|
| Swamee |
Excel formula:
=ENTRANCE_SHARP("Swamee")
Expected output:
| Result |
|---|
| 0.5 |
Example 3: Blevins method returns 0.5
Inputs:
| ent_sharp_method |
|---|
| Blevins |
Excel formula:
=ENTRANCE_SHARP("Blevins")
Expected output:
| Result |
|---|
| 0.5 |
Example 4: Miller method returns approximately 0.51
Inputs:
| ent_sharp_method |
|---|
| Miller |
Excel formula:
=ENTRANCE_SHARP("Miller")
Expected output:
| Result |
|---|
| 0.5093 |
Python Code
import micropip
await micropip.install(["fluids"])
from fluids.fittings import entrance_sharp as fluids_entrance_sharp
def entrance_sharp(ent_sharp_method='Rennels'):
"""
Calculate the loss coefficient (K) for a sharp entrance to a pipe flush with a reservoir wall.
See: https://fluids.readthedocs.io/fluids.fittings.html#fluids.fittings.entrance_sharp
This example function is provided as-is without any representation of accuracy.
Args:
ent_sharp_method (str, optional): Calculation method - Rennels, Swamee, Blevins, Idelchik, Crane, or Miller Valid options: Rennels, Swamee, Blevins, Idelchik, Crane, Miller. Default is 'Rennels'.
Returns:
float: Loss coefficient K for the sharp entrance [-]
"""
try:
result = fluids_entrance_sharp(method=ent_sharp_method)
return float(result)
except Exception as e:
return f"Error: {str(e)}"